package com.sinothk.client.system.controller;


import com.sinothk.client.system.model.AreaBean;
import com.sinothk.server.support.entity.ResultData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "行政区域")
@RestController
@RequestMapping("/area")
public class AreaController {
//
//    @ApiOperation(value = "新增用户", notes = "新增用户")
//    @PostMapping("/add")
//    public UserEntity add(@ApiParam(value = "用户名", required = true) @RequestParam("name") String name) {
//        UserEntity user = new UserEntity();
//
//        user.setUserName(name);
//        return user;
//    }

    @ApiOperation(value = "查询_根据上一级Id", notes = "查询：根据上一级pid")
    @GetMapping("/getAreaListByPId")
    public ResultData<AreaBean> getAreaListByPId(@ApiParam(value = "区域上一级id", required = true) @RequestParam("pid") String pid) {
        AreaBean area = new AreaBean();
        area.setAreaName("贵阳市");
        System.out.println("2222222222222222222222222222222222222222222222");
        return new ResultData<AreaBean>().getSuccess(area);
    }
}